# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gspell
pkgver=1.6.0
pkgrel=1
pkgdesc="a flexible API to implement the spell checking in a GTK+ application"
arch=('i686' 'x86_64')
url="https://wiki.gnome.org/Projects/gspell"
license=('GPL2')
depends=('gtk3' 'enchant' 'libxml2' 'iso-codes')
makedepends=('intltool' 'gobject-introspection' 'vala' gtk-doc autoconf-archive git)
_commit=db6fab254c6044cc26820144049ef86fb444aec6  # tags/1.6.0^0
source=("git+https://git.gnome.org/browse/gspell#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure  --prefix=/usr --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}
package(){
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
